From cfb953305c3432ffc3f3a465b34a6feba10e7faf Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 15 Jan 2009 07:09:26 +0000 Subject: [PATCH] (detect_coding_system): Fix handling of null_byte_fount. --- src/coding.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coding.c b/src/coding.c index 21c59454346..8c7ddf34db2 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7905,10 +7905,11 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep, } } - if ((detect_info.rejected & CATEGORY_MASK_ANY) == CATEGORY_MASK_ANY) + if ((detect_info.rejected & CATEGORY_MASK_ANY) == CATEGORY_MASK_ANY + || null_byte_found) { detect_info.found = CATEGORY_MASK_RAW_TEXT; - id = coding_categories[coding_category_raw_text].id; + id = CODING_SYSTEM_ID (Qno_conversion); val = Fcons (make_number (id), Qnil); } else if (! detect_info.rejected && ! detect_info.found) -- 2.30.2